<template>
  <el-card class="box-card">
    <div class="card-header">
      <div class="title">
        <el-icon size="16"><Tickets /></el-icon>
        <span class="text">{{ title }}</span>
      </div>
      <el-button type="primary" @click="emit('btnFn')">{{ btnText }}</el-button>
    </div>
  </el-card>
</template>
<script setup lang="ts">
import { Tickets } from '@element-plus/icons-vue';
const emit=defineEmits(['btnFn'])
defineProps({
  title: {
    type: String,
    default: "标题",
  },
  btnText: {
    type: String,
    default: "按钮",
  },
  // btnType:{
  //   type:String,
  //   default:'primary'
  // }
});
</script>
<style lang="less" scoped>
.card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.text{
    padding-left: 10px;
    font-size: 14px;
}
:deep(.el-icon){
    vertical-align: middle;
}
.box-card{
  margin: 20px 0;
}
</style>
